package com.zxl.grocerymicroservicewechatmeal.dataobject;


import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * @Author: zxl
 * @Description:类目表
 * @Date: Created in 23:36 2017/11/14
 * @Modified By:
 */
@Entity
@DynamicUpdate//动态更新，比如数据会自动更新更新时间
@Data//可以不用写get、set、tostring等方法 也可以用@Getter等方法不写get方法等
public class ProductCategory {
    /**
     * 类目id
     */
    @Id
    @GeneratedValue
    private Integer categoryId;
    /**
     * 类目名字
     */
    private String categoryName;
    /**
     * 类目编号
     */
    private Integer categoryType;

//    private Date createTime;
//
//    private Date updateTime;


    public ProductCategory() {
    }

    public ProductCategory(String categoryName, Integer categoryType) {
        this.categoryName = categoryName;
        this.categoryType = categoryType;
    }
}
